Online documentation - WebsydianExpress v3.5 |
WSYEXTJS/ExtWebGridPage
This is the base PageGenerator to use in the WebsydianExpress Ext JS framework when the page must contain a list of records (a grid).
The functionality of the grid page is changed significantly compared with the standard Websydian grid pages. The page now scopes a LoadData event that is responsible for providing the data for the grid. The way the grid pages functions now is as follows:
This might seem like a very complex operation, but for the developer, there is not much difference compared to earlier versions of Websydian.
The LoadData EventHandler can be compared to the Position EventHandler of a normal WebGridPageForProcess - and just as this EventHandler rarely needs to be modified, the LoadData EventHandler usually will work without modifications.
You can distinguish between the two calls of the PageGenerator by checking the value of the local field Document<ResponseType>. The second call (step 4 - the call that loads the grid data) will have the responsetype JSON.
Note that if the Position Event is used (either by entering a position or by pressing the refresh button), only steps 3 to 7 is performed.
Replace the view UIBasic.Grid by the view you want to use to define the order of the records.
Replace the function UIBasic.Grid.BlockFetch with the BlockFetch function you want to use to populate the grid.
Source Object | Verb | Target Object |
---|---|---|
MyWebGridPage | is a FNC | WSYEXTJS/ExtWebGridPage |
MyWebGridPage | replaces VW
...by VW |
UIBasic.Grid
MyEntity.MySortView |
MyWebGridPage | replaces FNC
... by FNC |
UIBasic.Grid.BlockFetch
MyEntity.MySortView.BlockFetchRRN |
If you add handling that should only be performed when the detail region is loaded (e.g. call a SingleFetch function to get additional information for WsyDetails), you can make an if statement that ensures that this is not performed when the local field Document<ResponseType> has the value <ResponseType.JSON>.
The BlockFetch function must inherit from either DataAccessRRN.Fetch.BlockFetchRRNWrapper or from RRNEntityRelationalTable.Fetch.WsyStatelessBlockFetchRRN.
The functionality described above means that when a grid page is called, the PageGenerator function will actually be called twice, by two separate HTTP-requests.
These two requests might not be serviced by the same application service job.
The first call will process the detail information, while the second call will provide the data for the grid region.
This means that if you debug a WevbGridPage function, you will see two calls - even though only one page is shown.